package com.isesol.ime.rest.api;

import com.isesol.api.rest.annoations.*;
import com.isesol.api.rest.model.base.*;
import com.isesol.ime.*;
import com.isesol.ime.util.*;
import org.springframework.stereotype.*;

/**
 * 后台管理
 * <p>
 * <li> 清除所有cache
 * </p>
 *
 * @author peter zhang
 */
@Service
@RestServiceClass(url = "manager")
public class ManagerResource extends BusinessResources{


	@RestServiceMethod(url = "testError", requestType = BaseRestRequest.class)
	public void testError(BaseRestRequest request) throws Exception{

		throw new RuntimeException("test Exception");

	}

	@RestServiceMethod(url = "clearAll", requestType = BaseRestRequest.class)
	public void clearAll(BaseRestRequest request) throws Exception{

		LOGGER.info(Constant.MODEL_NAME_MANAGER+"clearAll接口调用");

		CacheUtil.clearAll();
	}
}
